package com.yc.sole.framework.redis.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.time.Duration;

/**
 * @author yizuomin
 * @date 2022/11/25 15:05
 **/
@Getter
@AllArgsConstructor
public enum CacheTime {
    FIVE_SECONDS(Duration.ofSeconds(5), "5秒钟"),
    TEN_SECONDS(Duration.ofSeconds(10), "10秒钟"),
    FIFTEEN_SECONDS(Duration.ofSeconds(15), "15秒钟"),
    THIRTEEN_SECONDS(Duration.ofSeconds(30), "30秒钟"),
    ONE_MINUTE(Duration.ofMinutes(1), "1分钟"),
    TWO_MINUTE(Duration.ofMinutes(2), "2分钟"),
    FIVE_MINUTES(Duration.ofMinutes(5), "5分钟"),
    TEN_MINUTES(Duration.ofMinutes(10), "10分钟"),
    THIRTY_MINUTES(Duration.ofMinutes(30), "30分钟"),
    ONE_HOUR(Duration.ofHours(1), "1小时"),
    SIX_HOUR(Duration.ofHours(6), "6小时"),
    TWELVE_HOUR(Duration.ofHours(12), "12小时"),
    ONE_DAY(Duration.ofDays(1), "1天"),
    THREE_DAY(Duration.ofDays(3), "3天"),
    SEVEN_DAY(Duration.ofDays(7), "7天");

    private final Duration time;
    private final String description;
}
